package com.example.nccdeploytool;

import javafx.application.Application;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.control.Menu;
import javafx.scene.control.MenuBar;
import javafx.scene.control.MenuItem;
import javafx.scene.text.Font;
import javafx.stage.Stage;

import java.io.IOException;

public class HelloApplication extends Application {


    private static Stage primaryStage; // 保存主舞台的引用


    public static Stage getPrimaryStage() {
        return primaryStage;
    }


    private void exitProgram() {
        this.primaryStage.close();
    }


    @Override
    public void start(Stage stage) throws IOException {
        HelloApplication.primaryStage = stage; // 保存引用


        FXMLLoader fxmlLoader = new FXMLLoader(HelloApplication.class.getResource("hello-view.fxml"));
        Scene scene = new Scene(fxmlLoader.load(), 820, 640);
        stage.setTitle("NCC部署工具V0.0.2");


        stage.setScene(scene);
        stage.show();
    }


    public static void main(String[] args) {
        launch();
    }


}